/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "contrato_solicitacao_servico")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ContratoSolicitacaoServico.findAll", query = "SELECT c FROM ContratoSolicitacaoServico c")})
public class ContratoSolicitacaoServico implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "DATA_SOLICITACAO")
    @Temporal(TemporalType.DATE)
    private Date dataSolicitacao;
    @Column(name = "DATA_DESEJADA_INICIO")
    @Temporal(TemporalType.DATE)
    private Date dataDesejadaInicio;
    private Character urgente;
    @Column(name = "STATUS_SOLICITACAO")
    private Character statusSolicitacao;
    @JoinColumn(name = "ID_FORNECEDOR", referencedColumnName = "ID")
    @ManyToOne
    private Fornecedor idFornecedor;
    @JoinColumn(name = "ID_CLIENTE", referencedColumnName = "ID")
    @ManyToOne
    private Cliente idCliente;
    @JoinColumn(name = "ID_SETOR", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private Setor idSetor;
    @JoinColumn(name = "ID_COLABORADOR", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private Colaborador idColaborador;
    @JoinColumn(name = "ID_CONTRATO_TIPO_SERVICO", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private ContratoTipoServico idContratoTipoServico;

    public ContratoSolicitacaoServico() {
    }

    public ContratoSolicitacaoServico(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDataSolicitacao() {
        return dataSolicitacao;
    }

    public void setDataSolicitacao(Date dataSolicitacao) {
        this.dataSolicitacao = dataSolicitacao;
    }

    public Date getDataDesejadaInicio() {
        return dataDesejadaInicio;
    }

    public void setDataDesejadaInicio(Date dataDesejadaInicio) {
        this.dataDesejadaInicio = dataDesejadaInicio;
    }

    public Character getUrgente() {
        return urgente;
    }

    public void setUrgente(Character urgente) {
        this.urgente = urgente;
    }

    public Character getStatusSolicitacao() {
        return statusSolicitacao;
    }

    public void setStatusSolicitacao(Character statusSolicitacao) {
        this.statusSolicitacao = statusSolicitacao;
    }

    public Fornecedor getIdFornecedor() {
        return idFornecedor;
    }

    public void setIdFornecedor(Fornecedor idFornecedor) {
        this.idFornecedor = idFornecedor;
    }

    public Cliente getIdCliente() {
        return idCliente;
    }

    public void setIdCliente(Cliente idCliente) {
        this.idCliente = idCliente;
    }

    public Setor getIdSetor() {
        return idSetor;
    }

    public void setIdSetor(Setor idSetor) {
        this.idSetor = idSetor;
    }

    public Colaborador getIdColaborador() {
        return idColaborador;
    }

    public void setIdColaborador(Colaborador idColaborador) {
        this.idColaborador = idColaborador;
    }

    public ContratoTipoServico getIdContratoTipoServico() {
        return idContratoTipoServico;
    }

    public void setIdContratoTipoServico(ContratoTipoServico idContratoTipoServico) {
        this.idContratoTipoServico = idContratoTipoServico;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContratoSolicitacaoServico)) {
            return false;
        }
        ContratoSolicitacaoServico other = (ContratoSolicitacaoServico) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.ContratoSolicitacaoServico[ id=" + id + " ]";
    }
    
}
